package com.wyl.auth.schedule;

import com.wyl.auth.service.SseService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

/**
 * @Description
 * @Author WuYiLong
 * @Date 2025/4/22 21:41
 */
@Slf4j
@Component
public class SendMessageTask {

    @Autowired
    private SseService sseService;
    /**
     * 定时发送消息
     */
//    @Scheduled(cron = "* 10 * * * *")  // 每10分钟秒发一次
    public void sendMessageTask() {
        sseService.sendMessage();
    }
}